using System.Collections.Generic;
using Verse;

namespace RimWorld;

public static class KidnapUtility
{
	public static bool IsKidnapped(this Pawn pawn)
	{
		List<Faction> allFactionsListForReading = Find.FactionManager.AllFactionsListForReading;
		for (int i = 0; i < allFactionsListForReading.Count; i++)
		{
			if (allFactionsListForReading[i].kidnapped.KidnappedPawnsListForReading.Contains(pawn))
			{
				return true;
			}
		}
		return false;
	}
}
